package com.communism.config;

import com.communism.core.datasource.DataSourceCommunism;
import com.communism.core.generator.GeneratorCommunism;
import com.communism.core.globalconfig.GlobalConfigCommunism;
import com.communism.core.settemplateproperties.SetTemplatePropertiesCommunism;
import com.communism.core.tableinfo.TableInfoCommunism;
import com.communism.core.templateBaseInfo.TemplateBaseInfoCommunism;

/**
 * @author wangqinmin
 * @date 2023/4/9 09:45
 * @description: 共产主义接班人
 */
public class GeneratorConfig {

//    DataSourceCommunism dataSource;
//    GeneratorCommunism generator;
//    GlobalConfigCommunism globalConfig;
//    SetTemplatePropertiesCommunism setTemplateProperties;
//    TableInfoCommunism tableInfo;
//    TemplateBaseInfoCommunism templateBaseInfo;


    public void run() {
        DataSourceCommunism dataSource = getDataSource();
        // GlobalConfigCommunism
        // SetTemplatePropertiesCommunism
        // TemplateBaseInfoCommunism
         TableInfoCommunism tableInfo = new TableInfoCommunism();
         tableInfo.setDataSource(dataSource);

        // GeneratorCommunism

    }

    private DataSourceCommunism getDataSource() {
        DataSourceCommunism dataSource = new DataSourceCommunism();
        dataSource.setDriverName("com.mysql.cj.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://localhost:33061/mybatis-generator?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai");
        dataSource.setUsername("root");
        dataSource.setPassword("wangqinmin");
        return dataSource;
    }
}
